package com.jp.knowledge.view.maintab;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.jp.knowledge.R;

/**
 * Created by 528787067@qq.com on 2017/7/20.
 */

public class MainTab1 extends MainTabView.MainTabItemView {

	protected ImageView tabIcon;
	protected TextView tabTitle;
	protected TextView tabRemindCount;
	protected View tabRemindDot;

	public MainTab1(Context context) {
		super(context);
	}

	@Override
	protected void init() {
		super.init();
		tabIcon = getView(R.id.tabIcon);
		tabTitle = getView(R.id.tabTitle);
		tabRemindCount = getView(R.id.tabRemindCount);
		tabRemindDot = getView(R.id.tabRemindDot);
		tabTitle.setText("今日知识");
	}

	@Override
	public View setTabView() {
		return View.inflate(getContext(), R.layout.item_main_tab, null);
	}

	@Override
	public void selectState() {
		tabIcon.setImageResource(R.mipmap.bottombar_homepage_blue);
		tabTitle.setTextColor(getContext().getResources().getColor(R.color.theme_color));
	}

	@Override
	public void unselectState() {
		tabIcon.setImageResource(R.mipmap.bottombar_homepage);
		tabTitle.setTextColor(getContext().getResources().getColor(R.color.font_gray_deep));
	}
}
